import TestComp from './test-comp';

const { ccclass, property } = cc._decorator;
//@ts-ignore
import { eduProperty, i18n } from "education";
//@ts-ignore
import EduElementAbstract from "EduElementAbstract";

@ccclass('EnumListTestObject')
class EnumListTestObject {
    @property()
    objectString = '';
}

const list = [
    { name: 'name1', value: "value1" },
    { name: 'name2', value: "value2" },
    { name: 'name3', value: "value3" },
];
@ccclass
export default class EnumList extends EduElementAbstract {
    @property()
    @eduProperty({
        enumList: () => {
            return list;
        }
    })
    number = 1;

    @property({ type: [cc.String] })
    @eduProperty({
        enumList: () => {
            return list;
        }
    })
    string = [];

    @property(cc.Label)
    @eduProperty({
        enumList: () => {
            return list;
        }
    })
    label: cc.Label = null;

    @property({ type: EnumListTestObject })
    @eduProperty({
        enumList: () => {
            return list;
        }
    })
    object = new EnumListTestObject();

    @property(cc.Node)
    @eduProperty()
    engineNode = null;

    @property(cc.Label)
    @eduProperty()
    engineLabel=null;

    @property({ type: TestComp })
    @eduProperty({
        enumList: () => {
            return list;
        }
    })
    nodeSelf: TestComp = null;
}
